package com.fsnbigdata.domain;

import com.fsnbigdata.annotation.MyConstraint;
import org.hibernate.validator.constraints.Length;
import org.springframework.roo.addon.jpa.annotations.entity.JpaRelationType;
import org.springframework.roo.addon.jpa.annotations.entity.RooJpaRelation;
import org.springframework.util.Assert;

import javax.persistence.*;
import javax.validation.Valid;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * @Author: chen quan zhou
 * @Date: Created in 9:58 2018/9/14
 * @Modified By:
 */
@Entity
public class ZhDiversityReport {
    
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    
    /**
     * 是否为保护区：0否；1是
     */
    private Integer is_protection;
    
    /**
     * 省份
     */
    private String province;
    
    /**
     * 城市
     */
    private String city;
    
    /**
     * 区（县）
     */
    private String county;
    
    /**
     * 标题
     */
    private String title;
    
    /**
     * 浏览次数
     */
    private Long view_count;
    
    /**
     * 作者
     */
    private String author;
    
    /**
     * 创建时间
     */
    @Temporal(TemporalType.TIMESTAMP)
    private Date create_time;
    
    /**
     * 更新时间
     */
    @Temporal(TemporalType.TIMESTAMP)
    private Date update_time;
    
    /**
     * 状态：0未发布；1已发布
     */
    private Integer status;
    
    /**
     * 社会及自然概况_介绍
     */
    private String natural_profiles;
    
    /**
     * 社会及自然概况_社会概况_行政区划
     */
    private String administrative_division;
    
    /**
     * 社会及自然概况_社会概况_人口和民族
     */
    private String population_and_nationality;
    
    /**
     * 社会及自然概况_社会概况_社会经济
     */
    private String social_economy;
    
    /**
     * 社会及自然概况_自然概况_自然环境概况_地质地貌_地层
     */
    private String layer;
    
    /**
     * 社会及自然概况_自然概况_自然环境概况_地质地貌_地势结构
     */
    private String terrain_structure;
    
    /**
     * 社会及自然概况_自然概况_自然环境概况_地质地貌_山脉
     */
    private String mountains;
    
    /**
     * 社会及自然概况_自然概况_自然环境概况_气候
     */
    private String weather;
    
    /**
     * 社会及自然概况_自然概况_自然环境概况_河流、水系及流域
     */
    private String rivers_river_systems_basins;
    
    /**
     * 社会及自然概况_自然概况_自然环境概况_土壤
     */
    private String soil;
    
    /**
     * 生物多样性现状评估_生态系统多样性_森林生态系统
     */
    private String forest_ecosystem;
    
    /**
     * 生物多样性现状评估_生态系统多样性_森林生态系统_森林类型
     */
    private String forest_type;
    
    /**
     * 生物多样性现状评估_生态系统多样性_森林生态系统_植物区系_手写位置1
     */
    @Length(min = 0, max = 255,message ="气候环境特点信息内容长度必须在0-255个字符之间")
    private String plantage_input1;
    
    /**
     * 生物多样性现状评估_生态系统多样性_森林生态系统_植物区系_手写位置2
     */
    @Length(min = 0, max = 255,message ="植物区系特点信息内容长度必须在0-255个字符之间")
    private String plantage_input2;
    
    /**
     * 生物多样性现状评估_生态系统多样性_森林生态系统_植被的基本特征
     */
    private String basic_characteristics;
    
    /**
     * 生物多样性现状评估_生态系统多样性_森林生态系统_林业产业
     */
    private String forestry_industry;
    
    /**
     * 生物多样性现状评估_生态系统多样性_湿地生态系统_湿地类型1
     */
    @Length(min = 0, max = 255,message ="主要湿地类型信息内容长度必须在0-255个字符之间")
    private String wetland_type1;
    
    /**
     * 生物多样性现状评估_生态系统多样性_湿地生态系统_湿地类型2
     */
    @Length(min = 0, max = 255,message ="兼有湿地类型信息内容长度必须在0-255个字符之间")
    private String wetland_type2;
    
    /**
     * 生物多样性现状评估_生态系统多样性_湿地生态系统_湿地类型3
     */
    @MyConstraint(regexp = "^\\d+$",message = "湿地面积统计年限只能为数字类型（不能为小数）")
    private String wetland_type3;
    
    /**
     * 生物多样性现状评估_生态系统多样性_湿地生态系统_湿地类型4
     */
    @MyConstraint(regexp = "^[1-9][0-9]*(\\.[0-9]{1,"+11+"})?$",message = "包含湿地面积只能为数字类型（含小数）")
    private String wetland_type4;

    @MyConstraint(regexp = "^[1-9][0-9]*(\\.[0-9]{1,"+11+"})?$",message = "国土面积只能为数字类型（含小数）")
    private String wetland_type5;

    private String wetland_type6;

    private String wetland_type7;

    private String wetland_type8;
    
    /**
     * 生物多样性现状评估_生态系统多样性_湿地生态系统_河流湿地1
     */
    @MyConstraint(regexp = "^[1-9][0-9]*(\\.[0-9]{1,"+11+"})?$",message = "统计的河长只能为数字类型（含小数）")
    private String riverine_wetland1;
    
    /**
     * 生物多样性现状评估_生态系统多样性_湿地生态系统_河流湿地2
     */
    @MyConstraint(regexp = "^[1-9][0-9]*(\\.[0-9]{1,"+11+"})?$",message = "统计的河流流域面积只能为数字类型（含小数）")
    private String riverine_wetland2;
    
    /**
     * 生物多样性现状评估_生态系统多样性_湿地生态系统_河流湿地3
     */
    @MyConstraint(regexp = "^\\d+$",message = "达到要统计的河长或流域面积的河流数量只能为数字类型（不能为小数）")
    private String riverine_wetland3;
    
    /**
     * 生物多样性现状评估_生态系统多样性_湿地生态系统_河流湿地4
     */
    private String riverine_wetland4;
    
    /**
     * 生物多样性现状评估_生态系统多样性_农业生态系统
     */
    private String agroecological_system;
    
    /**
     * 生物多样性现状评估_生态系统多样性_洞穴生态系统_地区洞穴
     */
    private String hole;
    
    /**
     * 地区微生物多样性第一段
     */
    private String microbial_diversity_one;
    
    /**
     * 地区微生物多样性第二段
     */
    private String microbial_diversity_two;
    
    /**
     * 地区动物遗传资源
     */
    private String plant_animal_resources;
    
    /**
     * 地区植物遗传资源
     */
    private String plant_genetic_resources;
    
    /**
     * 微生物遗传资源
     */
    private String microbial_genetic_resources;

    /**
     * 微生物遗传资源_生境破碎化_里程数
     */
    @MyConstraint(regexp = "^[1-9][0-9]*(\\.[0-9]{1,"+11+"})?$",message = "地区公路通车里程数只能为数字类型（含小数）")
    private String mileage;

    /**
     * 微生物遗传资源_生境破碎化_公路密度
     */
    @MyConstraint(regexp = "^[1-9][0-9]*(\\.[0-9]{1,"+11+"})?$",message = "地区公路密度只能为数字类型（含小数）")
    private String highway_density;
    
    /**
     * 生物多样性受威胁现状_自然生境破坏现状_环境污染
     */
    private String ecological_pollution;
    
    /**
     * 生物多样性受威胁现状_自然生境破坏现状_生境退化、恶化严重
     */
    private String habitat_degradation;
    
    /**
     * 生物多样性受威胁现状_自然生境破坏现状_生境退化、恶化严重
     */
    private String development_and_utilization;
    
    /**
     * 生物多样性受威胁现状_外来物种入侵
     */
    private String species_invasion;
    
    /**
     * 生物多样性受威胁现状_环境污染
     */
    private String environmental_pollution;
    
    /**
     * 生物多样性保护_生物多样性保护相关法律法规
     */
    private String laws_and_regulations;
    
    /**
     * 生物多样性保护_生物多样性保护主要措施_就地保护_自然保护区
     */
    private String natural_reserve;
    
    /**
     * 生物多样性保护_生物多样性保护主要措施_就地保护_森林公园
     */
    @Length(min = 0, max = 255,message ="地区包含的森林公园信息内容长度必须在0-255个字符之间")
    private String forest_park;
    
    /**
     * 生物多样性保护_生物多样性保护主要措施_就地保护_湿地公园
     */
    @Length(min = 0, max = 255,message ="包含的湿地公园信息内容长度必须在0-255个字符之间")
    private String wetland_park;
    
    /**
     * 生物多样性保护_生物多样性保护主要措施_就地保护_风景名胜区
     */
    @Length(min = 0, max = 255,message ="包含的风景名胜区信息内容长度必须在0-255个字符之间")
    private String tourist_attraction;
    
    /**
     * 生物多样性保护_生物多样性保护主要措施_迁地保护
     */
    @Length(min = 0, max = 255,message ="包含的迁地养育场所信息内容长度必须在0-255个字符之间")
    private String ex_situ_conservation;
    
    /**
     * 生物多样性保护建议_完善生物多样性保护法律法规建设，将生物多样性保护纳入法制化轨道_规范性文件
     */
    @MyConstraint(regexp = "^\\d+$",message = "规范性文件数量只能为数字（不能是小数）")
    private String normative_documents;
    
    /**
     * 生物多样性保护建议_完善生物多样性保护法律法规建设，将生物多样性保护纳入法制化轨道
     */
    private String description_diversity_track;
    
    /**
     * 生物多样性保护建议_加强自然保护区的建设和管理水平，特别保护好生物多样性热点地区1
     */
    @MyConstraint(regexp = "^\\d+$",message = "已有的自然保护区只能为数字（不能是小数）")
    private String description_diversity_hotspots1;
    
    /**
     * 生物多样性保护建议_加强自然保护区的建设和管理水平，特别保护好生物多样性热点地区2
     */
    @MyConstraint(regexp = "^\\d+$",message = "已有的森林公园只能为数字（不能是小数）")
    private String description_diversity_hotspots2;
    
    /**
     * 生物多样性保护建议_加强自然保护区的建设和管理水平，特别保护好生物多样性热点地区3
     */
    @MyConstraint(regexp = "^\\d+$",message = "已有湿地公园只能为数字（不能是小数）")
    private String description_diversity_hotspots3;
    
    /**
     * 生物多样性保护建议_加强自然保护区的建设和管理水平，特别保护好生物多样性热点地区4
     */
    @MyConstraint(regexp = "^\\d+$",message = "已有风景名胜区只能为数字（不能是小数）")
    private String description_diversity_hotspots4;
    
    /**
     * 生物多样性保护建议_加强自然保护区的建设和管理水平，特别保护好生物多样性热点地区5
     */
    @Length(min = 0, max = 255,message ="该地自然保护区对于生物多样性保护工作不足之处信息内容长度必须在0-255个字符之间")
    private String description_diversity_hotspots5;
    
    /**
     * 生物多样性保护建议_加强环境污染治理，严格控制污染物排放
     */
    private String description_pollutant_emission;
    
    /**
     * 生物多样性保护建议_整合环境保护科学研究力量，对生物多样性进行深入研究
     */
    @Length(min = 0, max = 255,message ="多样性进行深入研究信息内容长度必须在0-255个字符之间")
    private String description_study;
    
    /**
     * 重点加强微生物资源、遗传资源的研究和保护力度
     */
    private String microbe_heredity_protect;
    
    /**
     * 积极应对不断出现的环境新问题
     */
    @Length(min = 0, max = 255,message ="不断出现环境新问题的区域信息内容长度必须在0-255个字符之间")
    private String reply_environmental_problems;
    
//    /**
//     * 参考文献
//     */
@ManyToMany(cascade = { javax.persistence.CascadeType.REFRESH, javax.persistence.CascadeType.PERSIST }, fetch = FetchType.EAGER, mappedBy = "diversitys")
@RooJpaRelation(type = JpaRelationType.AGGREGATION)
@OrderBy("docYear")
@Valid
private Set<Document> docs = new HashSet<Document>();
//    private String reference_documentation;


    /**
     * TODO Auto-generated attribute documentation
     *
     */
    public static final String ITERABLE_TO_ADD_CANT_BE_NULL_MESSAGE = "The given Iterable of items to add can't be null!";

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    public static final String ITERABLE_TO_REMOVE_CANT_BE_NULL_MESSAGE = "The given Iterable of items to add can't be null!";
    /**
     * 用于存储文章内容
     */
    private String content;


    public String getWetland_type5() {
        return wetland_type5;
    }
    
    public void setWetland_type5(String wetland_type5) {
        this.wetland_type5 = wetland_type5;
    }
    
    public String getWetland_type6() {
        return wetland_type6;
    }
    
    public void setWetland_type6(String wetland_type6) {
        this.wetland_type6 = getHtml( wetland_type6 );
    }
    
    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    public Integer getIs_protection() {
        return is_protection;
    }
    
    public void setIs_protection(Integer is_protection) {
        this.is_protection = is_protection;
    }
    
    public String getProvince() {
        return province;
    }
    
    public void setProvince(String province) {
        this.province = province;
    }
    
    public String getCity() {
        return city;
    }
    
    public void setCity(String city) {
        this.city = city;
    }
    
    public String getCounty() {
        return county;
    }
    
    public void setCounty(String county) {
        this.county = county;
    }
    
    public String getTitle() {
        return title;
    }
    
    public void setTitle(String title) {
        this.title = title;
    }
    
    public Long getView_count() {
        return view_count;
    }
    
    public void setView_count(Long view_count) {
        this.view_count = view_count;
    }
    
    public String getAuthor() {
        return author;
    }
    
    public void setAuthor(String author) {
        this.author = author;
    }
    
    public Date getCreate_time() {
        return create_time;
    }
    
    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }
    
    public Date getUpdate_time() {
        return update_time;
    }
    
    public void setUpdate_time(Date update_time) {
        this.update_time = update_time;
    }
    
    public Integer getStatus() {
        return status;
    }
    
    public void setStatus(Integer status) {
        this.status = status;
    }
    
    public String getNatural_profiles() {
        return natural_profiles;
    }
    
    public void setNatural_profiles(String natural_profiles) {
        this.natural_profiles = getHtml( natural_profiles );
    }
    
    public String getAdministrative_division() {
        return administrative_division;
    }
    
    public void setAdministrative_division(String administrative_division) {
        this.administrative_division = getHtml( administrative_division );
    }
    
    public String getPopulation_and_nationality() {
        return population_and_nationality;
    }
    
    public void setPopulation_and_nationality(String population_and_nationality) {
        this.population_and_nationality = getHtml( population_and_nationality );
    }
    
    public String getSocial_economy() {
        return social_economy;
    }
    
    public void setSocial_economy(String social_economy) {
        this.social_economy = getHtml( social_economy );
    }
    
    public String getLayer() {
        return layer;
    }
    
    public void setLayer(String layer) {
        this.layer = getHtml( layer );
    }
    
    public String getTerrain_structure() {
        return terrain_structure;
    }
    
    public void setTerrain_structure(String terrain_structure) {
        this.terrain_structure = getHtml( terrain_structure );
    }
    
    public String getMountains() {
        return mountains;
    }
    
    public void setMountains(String mountains) {
        this.mountains = getHtml( mountains );
    }
    
    public String getWeather() {
        return weather;
    }
    
    public void setWeather(String weather) {
        this.weather = getHtml(weather);
    }
    
    public String getRivers_river_systems_basins() {
        return rivers_river_systems_basins;
    }
    
    public void setRivers_river_systems_basins(String rivers_river_systems_basins) {
        this.rivers_river_systems_basins = getHtml( rivers_river_systems_basins );
    }
    
    public String getSoil() {
        return soil;
    }
    
    public void setSoil(String soil) {
        this.soil = getHtml( soil );
    }
    
    public String getForest_ecosystem() {
        return forest_ecosystem;
    }
    
    public void setForest_ecosystem(String forest_ecosystem) {
        this.forest_ecosystem = getHtml( forest_ecosystem );
    }
    
    public String getForest_type() {
        return forest_type;
    }
    
    public void setForest_type(String forest_type) {
        this.forest_type = getHtml( forest_type );
    }
    
    public String getPlantage_input1() {
        return plantage_input1;
    }
    
    public void setPlantage_input1(String plantage_input1) {
        this.plantage_input1 = plantage_input1;
    }
    
    public String getPlantage_input2() {
        return plantage_input2;
    }
    
    public void setPlantage_input2(String plantage_input2) {
        this.plantage_input2 = plantage_input2;
    }
    
    public String getBasic_characteristics() {
        return basic_characteristics;
    }
    
    public void setBasic_characteristics(String basic_characteristics) {
        this.basic_characteristics = getHtml( basic_characteristics );
    }
    
    public String getForestry_industry() {
        return forestry_industry;
    }
    
    public void setForestry_industry(String forestry_industry) {
        this.forestry_industry = getHtml( forestry_industry );
    }
    
    public String getWetland_type1() {
        return wetland_type1;
    }
    
    public void setWetland_type1(String wetland_type1) {
        this.wetland_type1 = wetland_type1;
    }
    
    public String getWetland_type2() {
        return wetland_type2;
    }
    
    public void setWetland_type2(String wetland_type2) {
        this.wetland_type2 = wetland_type2;
    }
    
    public String getWetland_type3() {
        return wetland_type3;
    }
    
    public void setWetland_type3(String wetland_type3) {
        this.wetland_type3 = wetland_type3;
    }
    
    public String getWetland_type4() {
        return wetland_type4;
    }


    public String getWetland_type7() {
        return wetland_type7;
    }

    public void setWetland_type7(String wetland_type7) {
        this.wetland_type7 = getHtml( wetland_type7 );
    }

    public String getWetland_type8() {
        return wetland_type8;
    }

    public void setWetland_type8(String wetland_type8) {
        this.wetland_type8 = getHtml( wetland_type8 );
    }

    public void setWetland_type4(String wetland_type4) {
        this.wetland_type4 = wetland_type4;
    }
    
    public String getRiverine_wetland1() {
        return riverine_wetland1;
    }
    
    public void setRiverine_wetland1(String riverine_wetland1) {
        this.riverine_wetland1 = riverine_wetland1;
    }
    
    public String getRiverine_wetland2() {
        return riverine_wetland2;
    }
    
    public void setRiverine_wetland2(String riverine_wetland2) {
        this.riverine_wetland2 = riverine_wetland2;
    }
    
    public String getRiverine_wetland3() {
        return riverine_wetland3;
    }
    
    public void setRiverine_wetland3(String riverine_wetland3) {
        this.riverine_wetland3 = riverine_wetland3;
    }
    
    public String getRiverine_wetland4() {
        return riverine_wetland4;
    }
    
    public void setRiverine_wetland4(String riverine_wetland4) {
        this.riverine_wetland4 = getHtml( riverine_wetland4 );
    }
    
    public String getAgroecological_system() {
        return agroecological_system;
    }
    
    public void setAgroecological_system(String agroecological_system) {
        this.agroecological_system = getHtml( agroecological_system );
    }
    
    public String getHole() {
        return hole;
    }
    
    public void setHole(String hole) {
        this.hole = getHtml( hole );
    }
    
    public String getMicrobial_diversity_one() {
        return microbial_diversity_one;
    }
    
    public void setMicrobial_diversity_one(String microbial_diversity_one) {
        this.microbial_diversity_one = getHtml( microbial_diversity_one );
    }
    
    public String getMicrobial_diversity_two() {
        return microbial_diversity_two;
    }
    
    public void setMicrobial_diversity_two(String microbial_diversity_two) {
        this.microbial_diversity_two = getHtml( microbial_diversity_two );
    }
    
    public String getPlant_animal_resources() {
        return plant_animal_resources;
    }
    
    public void setPlant_animal_resources(String plant_animal_resources) {
        this.plant_animal_resources = getHtml( plant_animal_resources );
    }
    
    public String getPlant_genetic_resources() {
        return plant_genetic_resources;
    }
    
    public void setPlant_genetic_resources(String plant_genetic_resources) {
        this.plant_genetic_resources = getHtml( plant_genetic_resources );
    }
    
    public String getMicrobial_genetic_resources() {
        return microbial_genetic_resources;
    }
    
    public void setMicrobial_genetic_resources(String microbial_genetic_resources) {
        this.microbial_genetic_resources = getHtml( microbial_genetic_resources );
    }
    
    public String getEcological_pollution() {
        return ecological_pollution;
    }
    
    public void setEcological_pollution(String ecological_pollution) {
        this.ecological_pollution = getHtml( ecological_pollution );
    }
    
    public String getHabitat_degradation() {
        return habitat_degradation;
    }
    
    public void setHabitat_degradation(String habitat_degradation) {
        this.habitat_degradation = getHtml( habitat_degradation );
    }
    
    public String getDevelopment_and_utilization() {
        return development_and_utilization;
    }
    
    public void setDevelopment_and_utilization(String development_and_utilization) {
        this.development_and_utilization = getHtml( development_and_utilization );
    }
    
    public String getSpecies_invasion() {
        return species_invasion;
    }
    
    public void setSpecies_invasion(String species_invasion) {
        this.species_invasion = getHtml( species_invasion );
    }
    
    public String getEnvironmental_pollution() {
        return environmental_pollution;
    }
    
    public void setEnvironmental_pollution(String environmental_pollution) {
        this.environmental_pollution = getHtml( environmental_pollution );
    }
    
    public String getLaws_and_regulations() {
        return laws_and_regulations;
    }
    
    public void setLaws_and_regulations(String laws_and_regulations) {
        this.laws_and_regulations = getHtml( laws_and_regulations );
    }
    
    public String getNatural_reserve() {
        return natural_reserve;
    }
    
    public void setNatural_reserve(String natural_reserve) {
        this.natural_reserve = getHtml( natural_reserve );
    }
    
    public String getForest_park() {
        return forest_park;
    }
    
    public void setForest_park(String forest_park) {
        this.forest_park = forest_park;
    }
    
    public String getWetland_park() {
        return wetland_park;
    }
    
    public void setWetland_park(String wetland_park) {
        this.wetland_park = wetland_park;
    }
    
    public String getTourist_attraction() {
        return tourist_attraction;
    }
    
    public void setTourist_attraction(String tourist_attraction) {
        this.tourist_attraction = tourist_attraction;
    }
    
    public String getEx_situ_conservation() {
        return ex_situ_conservation;
    }
    
    public void setEx_situ_conservation(String ex_situ_conservation) {
        this.ex_situ_conservation = ex_situ_conservation;
    }
    
    public String getNormative_documents() {
        return normative_documents;
    }
    
    public void setNormative_documents(String normative_documents) {
        this.normative_documents = normative_documents;
    }
    
    public String getDescription_diversity_track() {
        return description_diversity_track;
    }
    
    public void setDescription_diversity_track(String description_diversity_track) {
        this.description_diversity_track = getHtml( description_diversity_track );
    }
    
    public String getDescription_diversity_hotspots1() {
        return description_diversity_hotspots1;
    }
    
    public void setDescription_diversity_hotspots1(String description_diversity_hotspots1) {
        this.description_diversity_hotspots1 = description_diversity_hotspots1;
    }
    
    public String getDescription_diversity_hotspots2() {
        return description_diversity_hotspots2;
    }
    
    public void setDescription_diversity_hotspots2(String description_diversity_hotspots2) {
        this.description_diversity_hotspots2 = description_diversity_hotspots2;
    }
    
    public String getDescription_diversity_hotspots3() {
        return description_diversity_hotspots3;
    }
    
    public void setDescription_diversity_hotspots3(String description_diversity_hotspots3) {
        this.description_diversity_hotspots3 = description_diversity_hotspots3;
    }
    
    public String getDescription_diversity_hotspots4() {
        return description_diversity_hotspots4;
    }
    
    public void setDescription_diversity_hotspots4(String description_diversity_hotspots4) {
        this.description_diversity_hotspots4 = description_diversity_hotspots4;
    }
    
    public String getDescription_diversity_hotspots5() {
        return description_diversity_hotspots5;
    }
    
    public void setDescription_diversity_hotspots5(String description_diversity_hotspots5) {
        this.description_diversity_hotspots5 = description_diversity_hotspots5;
    }
    
    public String getDescription_pollutant_emission() {
        return description_pollutant_emission;
    }
    
    public void setDescription_pollutant_emission(String description_pollutant_emission) {
        this.description_pollutant_emission = getHtml( description_pollutant_emission );
    }
    
    public String getDescription_study() {
        return description_study;
    }
    
    public void setDescription_study(String description_study) {
        this.description_study = description_study;
    }
    
    public String getMicrobe_heredity_protect() {
        return microbe_heredity_protect;
    }
    
    public void setMicrobe_heredity_protect(String microbe_heredity_protect) {
        this.microbe_heredity_protect = microbe_heredity_protect;
    }
    
    public String getReply_environmental_problems() {
        return reply_environmental_problems;
    }
    
    public void setReply_environmental_problems(String reply_environmental_problems) {
        this.reply_environmental_problems = reply_environmental_problems;
    }
    
//    public String getReference_documentation() {
//        return reference_documentation;
//    }
//
//    public void setReference_documentation(String reference_documentation) {
//        this.reference_documentation = getHtml( reference_documentation );
//    }


    public Set<Document> getDocs() {
        return docs;
    }

    public void setDocs(Set<Document> docs) {
        this.docs = docs;
    }

    public String getContent() {
        return content;
    }
    
    public void setContent(String content) {
        this.content = content;
    }

    public String getMileage() {
        return mileage;
    }

    public void setMileage(String mileage) {
        this.mileage = mileage;
    }

    public String getHighway_density() {
        return highway_density;
    }

    public void setHighway_density(String highway_density) {
        this.highway_density = highway_density;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param docsToAdd
     */
    public void addToDocs(Iterable<Document> docsToAdd) {
        Assert.notNull(docsToAdd, ITERABLE_TO_ADD_CANT_BE_NULL_MESSAGE);
        for (Document item : docsToAdd) {
            this.docs.add(item);
            item.getDiversitys().add(this);
        }
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param docsToRemove
     */
    public void removeFromDocs(Iterable<Document> docsToRemove) {
        Assert.notNull(docsToRemove, ITERABLE_TO_REMOVE_CANT_BE_NULL_MESSAGE);
        for (Document item : docsToRemove) {
            this.docs.remove(item);
            item.getDiversitys().remove(this);
        }
    }

    public String getHtml(String html){
        //如果字符串为空，就返回空
        if(html==null||"".equals( html )){
            return null;
        }
        String newHtml = "";
        String[] htmls = html.split( "</p>" );
        for(String h : htmls){
            if(h==null||"".equals( h )){
                continue;
            }
            Integer length = h.length();
            String html1 = h.substring( 0,2 );
            String html2 = h.substring( 2,length );
            Integer sign = html2.indexOf( "class" );
            if(!("<p".equals( html1 ))){
                newHtml = newHtml+h;
                continue;
            }
            if(sign ==-1){
                newHtml = newHtml + html1+" class='MsoNormal' style='text-indent:21.7500pt;'"+html2+"</p>";
            }else {
                if(html2==null||"".equals( html2 )){
                    newHtml = newHtml + h +"</p>";
                }else {
                    if(html2.indexOf( "class='MsoNormal'" )!=-1){
                        newHtml = newHtml + html1 + " class='MsoNormal' style='text-indent:21.7500pt;'" + html2.substring( html2.indexOf( ">" ),html2.length())+"</p>";
                    }else {
                        newHtml = newHtml + h +"</p>";
                    }

                }

            }
        }


        return newHtml;
    }
}
